<script>
	export default {
		globalData: {
			channel: ''  
		},
		onLaunch: function() {
			let urlData = this.$util.getUrlVal();
			if (urlData.userCode || urlData.userCode == '0') {
				uni.setStorageSync("invitedId", urlData.userCode);
			}
			if (urlData.channel) {
				this.globalData.channel = urlData.channel;
				console.log(this.globalData)
				uni.hideTabBar();
			}
		},
		onShow: function() {},
		onHide: function() {},
		methods: {
			// 获取屏幕高度
			getPhoneHeight() {
				uni.getSystemInfo({
					success: res => {
						this.globalData.phoneHeight = res.windowHeight; //获取屏幕高度减去上面内容的高度,铺满下面的空白区域
					}
				});
			},
			// 存入用户信息
			setUserInfo(info) {
				this.globalData.siteInfo = info;
				uni.setStorageSync("siteInfo", info);
			},
		}
	}
</script>

<style lang="scss">
	@import "@/uni_modules/uview-ui/index.scss";
	/*每个页面公共css */
	view {
		box-sizing: border-box;
	}
		
	
	//元素居中
	.middleY {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
	}

	.middleX {
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
	}

	.middleC {
		position: absolute;
		left: 50%;
		top: 50%;
		transform: translate(-50%, -50%);
	}

	/* 字体超出 ...显示 */
	// 一行隐藏
	.single-line {
		text-overflow: ellipsis;
		white-space: nowrap;
		overflow: hidden;
	}

	// 两行隐藏
	.multi-line {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;
		word-break: break-all;
	}

	// 三行隐藏
	.third-line {
		display: -webkit-box;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
		text-overflow: clip;
		overflow: hidden;
	}

	// 四行隐藏
	.four-line {
		display: -webkit-box;
		-webkit-line-clamp: 4;
		-webkit-box-orient: vertical;
		text-overflow: clip;
		overflow: hidden;
	}
	
	// 禁止图片长按保存
	.noSaveImg{
		pointer-events:none
	}


</style>
